<!--
 * @FilePath     : /study_code/html/float.html
 * @Description  : 浮动 脱离文档流
 * @Date         : 2025-04-26 21:36:07
 * @Author       : Fang YingGui
 * @LastEditors  : fangyinggui 18715384437@163.com
 * @LastEditTime : 2025-04-26 21:38:33
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>documentName</title>
    <link rel="stylesheet" href="" />
    <style>
      .parent {
        width: 400px;
        height: 200px;
        border: 1px solid lightcoral;
      }
      .box {
        width: 40px;
        height: 40px;
      }

      .box1 {
        background-color: lightblue;
        opacity: 0.6;
      }

      .box2 {
        background-color: red;
        opacity: 0.6;
        float: left;
        margin-top: 80px;
      }

      .box3 {
        background-color: lightseagreen;
        opacity: 0.6;
        float: right;
      }

      .box4 {
        background-color: limegreen;
        opacity: 0.6;
        margin-top: 10px;
      }
    </style>
  </head>
  <body>
    <div class="parent">
      <div class="box box1"></div>
      <div class="box box2"></div>
      <div class="box box3"></div>
      <div class="box box4"></div>
    </div>
    <script></script>
  </body>
</html>
